import java.util.TimerTask;

//@author A0105195J

public class PopUpTimer {

	static Task task1;

	public PopUpTimer() {

	}

	public static void setTask(Task t) {
		task1 = t;
	}

	static TimerTask T = new TimerTask() {

		@Override
		public void run() {
			PopUpTimer.interval();
		}

	};

	public static void interval() {
		Task t = Functions.getTaskWithEarliestReminder();
		if (t != null) {
			setTask(t);
			PopUp.runPopUp(PopUpTimer.task1);
		}
	}
}
